package usb;
import java.util.Scanner;

public class Test05 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入用户名");
        String name= sc.next();
        System.out.println("是否为会员");
        String vip= sc.next();
        System.out.println("请输入价格");
        int price= sc.nextInt();
        if(vip.equals("y")){
            if (price < 100) {
                price= (int) (price*0.9);
            }else{
                price= (int) (price*0.7);
            }
        }else {
            if (price >= 300) {
                price= (int) (price*0.8);
            }
        }
        System.out.println("最终价格为"+price);
        }
}